package com.ryskoo.common.hclconstant;

/**
 * 退款状态
 *
 * @author BeHappy
 */
public enum RefundStateEnum {
    REFUNDING(1, "退款中"),
    REFUNDED(2, "退款成功"),
    REFUND_ERROR(3, "退款失败");
    private int value;
    private String name;

    RefundStateEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(int value) {
        for (RefundStateEnum o : RefundStateEnum.values()) {
            if (o.getValue() == value) {
                return o.getName();
            }
        }
        return "";
    }
}
